<?phpsession_start();
include('database.php');$conn=$_SESSION[conn];if(isset($_POST[per_page])){$_SESSION[per_page]=$_POST[per_page];$perpage = $_POST[per_page];}else{$perpage = $_SESSION[per_page];}
/*
Template Name: Template Search Proposal
*/

	get_header();

	if (have_posts()) : while (have_posts()) : the_post(); 

	// GET CUSTOM SIDEBAR
	$sidebar = get_post_meta($post->ID, 'sidebar_value', true);
//if you already login as investor then u can use this feature search engineif(isset($_SESSION[login]) and $_SESSION[user_type]=='investor'){
	?><head><link type="text/css" href="<?php echo bloginfo('template_url') ?>/jquery.keypad.css" rel="stylesheet"><link rel='stylesheet' type='text/css' href='<?php echo bloginfo('template_url') ?>/dashboard.css' /><link rel="stylesheet" type="text/css" href="<?php echo bloginfo('template_url') ?>/main_dashboard.css"/></head>	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script type="text/javascript" src="<?php echo bloginfo('template_url') ?>/jquery.keypad.js"></script>	<br><br>    <div id="dolphincontainer">    <div id="dolphinnav">    <ul>    <li><a href="<?php echo bloginfo('url')?>/investor_dashboard/" title="" ><span>Dashboard</span></a></li>	<li><a href="<?php echo bloginfo('url')?>/search_proposal/" title="" class="current" ><span>Search Proposal</span></a></li>	<li><a href="<?php echo bloginfo('url')?>/investment_criteria/" title="" ><span>Investment Criteria</span></a></li>    <li><a href="<?php echo bloginfo('url')?>/edit-profile/" title=""><span>Profile</span></a></li>       </ul>    </div>    </div>
<Script>$(document).ready(function(){//cek number and limitfunction isNumber (o) {  return ! isNaN (o-0);}  $("#min_capital_needed").keyup(function(e){txtVal = $(this).val();   if( txtVal.length>15 && isNumber(txtVal)) {     $(this).val(txtVal.substring(0,15) ) } if(!isNumber(txtVal)) {     $(this).val('') }});	$("#max_capital_needed").keyup(function(e){txtVal = $(this).val();   if( txtVal.length>15 && isNumber(txtVal)) {     $(this).val(txtVal.substring(0,15) ) } if(!isNumber(txtVal)) {     $(this).val('') }});	});	</script>
	<div id="content">

		<div class="contentbox <?php
			if ($sidebar == 'No sidebar') :

				echo'wfull';

			elseif ($sidebar == 'Buddy Sidebar') :

				echo'w720';

			else :

				echo'w620';

			endif; ?>"><?php	//pagingif(isset($_GET["hal"])){	$page = intval($_GET["hal"]);}else {$page = 1;}$calc = $perpage * $page;$start = $calc - $perpage;	?><table rules="none" style="border:0px;border:none;width:100%;text-align:center">		<form action="" method="POST" name="form_search" id="form_search" >		<tbody id="entrepreneur_search_engine" style="">				<tr bgcolor=silver>								<td style="border:none" width="20%">					Select Country:				</td>								<td style="border:none" width="20%">					Select State:				</td>				<td style="border:none" width="20%">					Select Industry:				</td>								<td style="border:none" colspan=2>					<center>Range Capital Needed:				</td>								<td style="border:none">								</td>		</tr>		<tr bgcolor=silver><script type="text/javascript">$(document).ready(function() {    /*	$("#entrepreneur_country").change(function() {		$(this).after('<div id="loader"><img src="<?php echo bloginfo('template_url'); ?>/images/loading.gif" alt="loading State..." /></div>');		$.get('<?php echo bloginfo('template_url'); ?>/country.php?status=entrepreneur&country=' + $(this).val(), function(data) {			$("#entrepreneur_state").html(data);			$('#loader').slideUp(200, function() {				$(this).remove();			});		});	    });*/});</script>								<td style="border:none" width="20%">							<select id="entrepreneur_country" name="entrepreneur_country" style="width:150px; height:25px; font-size:15px">														<?php							$q_get_country= "select distinct country_name,country_id from country_entrepreneur";							$hq_get_country= mysql_db_query($DataBase,$q_get_country);														while(list($location,$id) = mysql_fetch_row($hq_get_country))							{							?>							<option value="<?php  echo $location ?>" <?php if($location=="Singapore"){ echo "selected"; } ?> ><?php echo $location ?></option>							<?php							}							?>							</select>				</td>				<td style="border:none" width="20%">							<select id="entrepreneur_state" name="entrepreneur_state" style="width:150px; height:25px; font-size:15px">							<option value="Singapore">Singapore</option>							</select>				</td>				<td style="border:none" width="20%">							<select id="entrepreneur_industry" name="entrepreneur_industry" style="width:150px; height:25px; font-size:15px">							<option value="">View All</option>							<option value="Real Estate">Real Estate</option>							<option value="Information Technology">Information Technology</option>							<option value="Food and beverage Industry">Food and beverage Industry</option>							<option value="Tourism Hospitality, Restaurants & Bars">Tourism Hospitality, Restaurants & Bars</option>							<option value="Manufacturing">Manufacturing</option>							<option value="E-Commerce">E-Commerce</option>							<option value="Entertainment">Entertainment</option>							<option value="Pharmacy">Pharmacy</option>							<option value="Personal-care">Personal-care</option>							<option value="Education and Training">Education and Training</option>							<option value="Leisure, Tourism &Hotels">Leisure, Tourism & Hotels</option>							<option value="Transportation">Transportation</option>							<option value="Agriculture">Agriculture</option>							<option value="Building Services & Products">Building Services & Products</option>							<option value="Financial, Business & Legal Services">Financial, Business & Legal Services</option>							<option value="Security & Defense">Security & Defense</option>							<option value="Mining, Oil & Gas">Mining, Oil & Gas</option>							<option value="Retail">Retail</option>							<option value="Marketing & Advertising">Marketing & Advertising</option>							<option value="Fashion & Beauty">Fashion & Beauty</option>							<option value="Aviation">Aviation</option>							<option value="Media & Publishing">Media & Publishing</option>							<option value="Biotechnology& Life Sciences">Biotechnology& Life Sciences</option>							<option value="Telecom & Mobile">Telecom & Mobile</option>							<option value="Others">Others</option>							<!--							<?php							//$q_get_industry= "select distinct industry_1 from proposal where status='active'";							//$hq_get_industry= mysql_db_query($DataBase,$q_get_industry);							//echo $q_get_data;							//while(list($industry) = mysql_fetch_row($hq_get_industry))							//{														?>							<option value="<?php  //echo $industry ?>"><?php //echo $industry ?></option>							<?php							//}														?>							-->							</select>				</td><script>$(document).ready(function() {$("#min_capital_needed").click(function(){	$("#min_capital_needed").keypad();	});$("#max_capital_needed").click(function(){	$("#max_capital_needed").keypad();	});});</script>								<td style="border:none" width="20%">							S$<input type="text" name="min_capital_needed" id="min_capital_needed" value="" style="height:25px; width:100px; font-size:13pt" />				</td>				<td style="border:none" width="25%">							S$<input type="text" name="max_capital_needed" id="max_capital_needed" value="" style="height:25px; width:100px; font-size:13pt" />				</td>				<td style="border:none">				<input type="submit" id="search_proposal" name="search_proposal" value="OK">				</td>						</tr>		</tbody>			</form>		</table>	<form id="latest_proposal" name="latest_proposal" method="POST" action="">	<input type="submit" id="latest_proposal" name="latest_proposal" value="View All" />	</form>	</br>	</br>			<table>	<tr>			<td width="150px" bgcolor=grey>			<Center><b>Image			</td>			<td width="200px" bgcolor=grey>			<Center><b>Brief Profile			</td>			<td width="100px" bgcolor=grey>			<?php if($_GET[industry]=='proposal.industry_1 ASC'){ ?>			<Center><b><a href="<?php echo bloginfo('url')?>/search_proposal?industry=proposal.industry_1 DESC" style="color:black;">Industry (DESC)</a>			<?php  }else{  ?>			<Center><b><a href="<?php echo bloginfo('url')?>/search_proposal?industry=proposal.industry_1 ASC" style="color:black;">Industry (ASC)</a>			<?php } ?>			</td>			<td width="100px" bgcolor=grey>			<?php if($_GET[company_name]=='proposal.company_name ASC'){ ?>			<Center><b><a href="<?php echo bloginfo('url')?>/search_proposal?company_name=proposal.company_name DESC" style="color:black;">Company Name (DESC)</a>			<?php  }else{  ?>			<Center><b><a href="<?php echo bloginfo('url')?>/search_proposal?company_name=proposal.company_name ASC" style="color:black;">Company Name (ASC)</a>			<?php } ?>			</td>			<td width="100px" bgcolor=grey>			<?php if($_GET[min_investment]=='proposal.minimum_investment ASC'){ ?>			<Center><b><a href="<?php echo bloginfo('url') ?>/search_proposal?min_investment=proposal.minimum_investment DESC" style="color:black;">Min Investment (DESC)</a>			<?php }else{ ?>			<Center><b><a href="<?php echo bloginfo('url') ?>/search_proposal?min_investment=proposal.minimum_investment ASC" style="color:black;">Min Investment (ASC)</a>			<?php } ?>			</td>			<td width="100px" bgcolor=grey>			<?php if($_GET[raising_total]=='proposal.total_raise ASC'){ ?>			<Center><b><a href="<?php echo bloginfo('url') ?>/search_proposal?raising_total=proposal.total_raise DESC" style="color:black;">Capital Needed (DESC)</a>			<?php }else{ ?>			<Center><b><a href="<?php echo bloginfo('url') ?>/search_proposal?raising_total=proposal.total_raise ASC" style="color:black;">Capital Needed (ASC)</a>			<?php } ?>			</td>			<td width="100px" bgcolor=grey>			<?php if($_GET[have_raised]=='proposal.total_have_you_raised ASC'){ ?>			<Center><b><a href="<?php echo bloginfo('url') ?>/search_proposal?have_raised=proposal.total_have_you_raised DESC" style="color:black;">Investment Raised (DESC)</a>			<?php }else{ ?>			<Center><b><a href="<?php echo bloginfo('url') ?>/search_proposal?have_raised=proposal.total_have_you_raised ASC" style="color:black;">Investment Raised (ASC)</a>			<?php } ?>			</td>			</tr>	</br>	</table>	<?php		if(isset($_POST[entrepreneur_country]) and isset($_POST[entrepreneur_state]) and isset($_POST[entrepreneur_industry]) and isset($_POST[min_capital_needed]) and isset($_POST[max_capital_needed]) and $_POST[entrepreneur_country]!='' and $_POST[entrepreneur_state]!='' and $_POST[entrepreneur_industry]!='' and $_POST[min_capital_needed]!='' and $_POST[max_capital_needed]!='')	{			//save in the session function			$_SESSION[s_entrepreneur_country]=$_POST[entrepreneur_country];			$_SESSION[s_entrepreneur_state]=$_POST[entrepreneur_state];			$_SESSION[s_entrepreneur_industry]=$_POST[entrepreneur_industry];			$_SESSION[s_min_capital_needed]=$_POST[min_capital_needed];			$_SESSION[s_max_capital_needed]=$_POST[max_capital_needed];							//search based on the search engine		global pro must come first, and pro and novice				$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.management_location='$_POST[entrepreneur_country]' and proposal.industry_1='$_POST[entrepreneur_industry]' and proposal.state='$_POST[entrepreneur_state]' and ('$_POST[min_capital_needed]'<=proposal.total_raise and proposal.total_raise<='$_POST[max_capital_needed]') and proposal.status='active' and user.user_id=proposal.user_id ORDER BY user.pakage ASC LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);			$result = mysqli_query($conn,"select count(*) as Total from proposal,user where proposal.management_location='$_POST[entrepreneur_country]' and proposal.industry_1='$_POST[entrepreneur_industry]' and proposal.state='$_POST[entrepreneur_state]' and ('$_POST[min_capital_needed]'<=proposal.total_raise and proposal.total_raise<='$_POST[max_capital_needed]') and proposal.status='active' and user.user_id=proposal.user_id");			$rows = mysqli_num_rows($result);			}else if((isset($_GET[industry]) or isset($_GET[company_name]) or isset($_GET[min_investment]) or isset($_GET[raising_total]) or isset($_GET[have_raised])) and ($_SESSION[s_entrepreneur_country]!='' and $_SESSION[s_entrepreneur_state]!='' and $_SESSION[s_entrepreneur_industry]!='' and $_SESSION[s_min_capital_needed]!='' and $_SESSION[s_max_capital_needed]!='')){						$result = mysqli_query($conn,"select count(*) as Total from proposal,user where proposal.management_location='$_SESSION[s_entrepreneur_country]' and proposal.industry_1='$_SESSION[s_entrepreneur_industry]' and proposal.state='$_SESSION[s_entrepreneur_state]' and ('$_POST[min_capital_needed]'<=proposal.total_raise and proposal.total_raise<='$_POST[max_capital_needed]') and proposal.status='active' and user.user_id=proposal.user_id");			$rows = mysqli_num_rows($result);		//this called when they want to short by company name/min_funding/raising total/total have you raised.			if(isset($_GET[company_name]))			{			$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.management_location='$_SESSION[s_entrepreneur_country]' and proposal.industry_1='$_SESSION[s_entrepreneur_industry]' and proposal.state='$_SESSION[s_entrepreneur_state]' and ('$_POST[min_capital_needed]'<=proposal.total_raise and proposal.total_raise<='$_POST[max_capital_needed]') and proposal.status='active' and user.user_id=proposal.user_id ORDER BY $_GET[company_name] LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);						}			if(isset($_GET[min_investment]))			{			$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.management_location='$_SESSION[s_entrepreneur_country]' and proposal.industry_1='$_SESSION[s_entrepreneur_industry]' and proposal.state='$_SESSION[s_entrepreneur_state]' and ('$_POST[min_capital_needed]'<=proposal.total_raise and proposal.total_raise<='$_POST[max_capital_needed]') and proposal.status='active' and user.user_id=proposal.user_id ORDER BY $_GET[min_investment] LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);						}			if(isset($_GET[raising_total]))			{			$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.management_location='$_SESSION[s_entrepreneur_country]' and proposal.industry_1='$_SESSION[s_entrepreneur_industry]' and proposal.state='$_SESSION[s_entrepreneur_state]' and ('$_POST[min_capital_needed]'<=proposal.total_raise and proposal.total_raise<='$_POST[max_capital_needed]') and proposal.status='active' and user.user_id=proposal.user_id ORDER BY $_GET[raising_total] LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);						}			if(isset($_GET[have_raised]))			{			$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.management_location='$_SESSION[s_entrepreneur_country]' and proposal.industry_1='$_SESSION[s_entrepreneur_industry]' and proposal.state='$_SESSION[s_entrepreneur_state]' and ('$_POST[min_capital_needed]'<=proposal.total_raise and proposal.total_raise<='$_POST[max_capital_needed]') and proposal.status='active' and user.user_id=proposal.user_id ORDER BY $_GET[have_raised] LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);					}			if(isset($_GET[industry]))			{			$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.management_location='$_SESSION[s_entrepreneur_country]' and proposal.industry_1='$_SESSION[s_entrepreneur_industry]' and proposal.state='$_SESSION[s_entrepreneur_state]' and ('$_POST[min_capital_needed]'<=proposal.total_raise and proposal.total_raise<='$_POST[max_capital_needed]') and proposal.status='active' and user.user_id=proposal.user_id ORDER BY $_GET[industry] LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);			}			}else if(isset($_POST[entrepreneur_country]) and isset($_POST[entrepreneur_state]) and isset($_POST[entrepreneur_industry]) and !isset($_POST[min_capital_needed]) and !isset($_POST[max_capital_needed])){	//show all the industry in particular conutry and state.	//paging			$result = mysqli_query($conn,"select count(*) as Total from proposal,user where proposal.management_location='$_SESSION[s_entrepreneur_country]' and proposal.state='$_SESSION[s_entrepreneur_state]' and proposal.status='active' and user.user_id=proposal.user_id");			$rows = mysqli_num_rows($result);				$_SESSION[s_entrepreneur_country]=$_POST[entrepreneur_country];	$_SESSION[s_entrepreneur_state]=$_POST[entrepreneur_state];				$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.management_location='$_SESSION[s_entrepreneur_country]' and proposal.state='$_SESSION[s_entrepreneur_state]' and proposal.status='active' and user.user_id=proposal.user_id ORDER BY user.pakage ASC LIMIT $start,$perpage";	$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);		}else	{					//clear all session			$_SESSION[s_entrepreneur_country]='';			$_SESSION[s_entrepreneur_state]='';			$_SESSION[s_entrepreneur_industry]='';			$_SESSION[s_min_capital_needed]='';			$_SESSION[s_max_capital_needed]='';						//paging			$result = mysqli_query($conn,"select count(*) as Total from proposal,user where proposal.status='active' and user.user_id=proposal.user_id");			$rows = mysqli_num_rows($result);			//view all			if(isset($_GET[company_name]))			{			$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.status='active' and user.user_id=proposal.user_id ORDER BY $_GET[company_name] LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);						}else if(isset($_GET[min_investment])){			$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.status='active' and user.user_id=proposal.user_id ORDER BY $_GET[min_investment] LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);						}else if(isset($_GET[raising_total])){			$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.status='active' and user.user_id=proposal.user_id ORDER BY $_GET[raising_total] LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);						}else if(isset($_GET[have_raised])){			$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.status='active' and user.user_id=proposal.user_id ORDER BY $_GET[have_raised] LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);						}else if(isset($_GET[industry])){			$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.status='active' and user.user_id=proposal.user_id ORDER BY $_GET[industry] LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);						}else			{			$q_get_proposal= "select user.first_name,user.last_name,proposal.total_have_you_raised,proposal.stage,proposal.short_summary,proposal.state,proposal.industry_1,proposal.user_id,proposal.company_name,proposal.management_location,proposal.minimum_investment,proposal.total_raise,proposal.short_summary,proposal.proposal_id from proposal,user where proposal.status='active' and user.user_id=proposal.user_id ORDER BY user.pakage ASC LIMIT $start,$perpage";			$hq_get_proposal= mysql_db_query($DataBase,$q_get_proposal);						}			 	}			//echo $q_get_data;			while(list($first_name,$last_name,$total_have_you_raised,$stage,$summary,$state,$industry,$user_id,$company_name,$management_location,$minimum_investment,$total_raise,$short_summary,$proposal_id) = mysql_fetch_row($hq_get_proposal))			{									$q_get_image= "select image from user where user_id='$user_id'";			$hq_get_image= mysql_db_query($DataBase,$q_get_image);			//echo $q_get_data;			while(list($image) = mysql_fetch_row($hq_get_image))			{										?>			<table border=1 bgcolor=gray >			<tr>			<td width="150px" bgcolor=silver>						<center>									<a href="#">					<?php if($image==''){  ?>					<img src="<?php echo bloginfo('template_url')?>/images/no_image.gif" width="150" height="150" />					<?php }else{ ?>					<img src="data:image/jpeg;base64,<?php echo base64_encode($image); ?>" width="150" height="150" />					<?php }  ?>										</a>							</td>			<td bgcolor=silver width="200px" >															Entreperneur ID: <b>ENT_<?php  echo substr($user_id, -10,4); ?></b></br>					</br>					Name : <b><?php echo $first_name." ".$last_name ?></b></br>					Country: <b><?php echo $management_location ?></b></br>					State: <b><?php echo $state ?></b></br>					Stage: <b><?php echo $stage; ?></b></br>										<?php			$q_cek= "select count(*),status from nudge where investor_id='$_SESSION[user_id]' and proposal_id='$proposal_id'";			$hq_cek= mysql_db_query($DataBase,$q_cek);						while(list($nudge_id,$status) = mysql_fetch_row($hq_cek))			{			$nudge=$nudge_id;						?>						</td>			<td bgcolor=silver width="100px" >			<?php echo $industry; ?>			</td>			<td width="100px" bgcolor=silver width="100px">			<?php  echo $company_name ?>			</td>			<td width="100px" bgcolor=silver width="100px">			<b><font>S$<?php echo number_format($minimum_investment); ?></font></b>			</td>			<Td width="100px" bgcolor=silver width="100px">			<b><font color=red>S$<?php echo number_format($total_raise); ?></font></b>			</td>			<Td width="100px" bgcolor=silver width="100px">			<b><font>S$<?php echo number_format($total_have_you_raised); ?></font></b>			</td>			</tr>			<tr>			<td colspan=7 bgcolor=silver>Summary : <b><?php echo $short_summary; ?></b></td>			</tr>			<tr>			<!-- if the nudge has been approved by entrepreneur... -->			<?php  if($status=='accept'){ ?>			<td bgcolor=black colspan=7><a href="<?php echo bloginfo('template_url') ?>/view_proposal.php?proposal_id=<?php echo $proposal_id ?>" ><b>Find Out More --></b></a>				</td>												<?php  }else{ ?>			<td colspan=7 bgcolor=#000000>			<?php			if($nudge==1)			{			}else if($nudge==0){					?>										<a href="<?php echo bloginfo('template_url') ?>/entrepreneur_nudge.php?proposal_id=<?php  echo $proposal_id ?>" onclick="alert('nudge has been sent');">Nudge!					</a>										<?php  } ?>						<?php } ?>			</td>			</tr>						</br>			<?php						}			?>			</table>			<?php } } 			$error = mysql_num_rows($hq_get_proposal);			if($error==0)			{			echo "Data Not Found.";			}			?>			</br></br>			<div style="text-align:right;">									<?php//pagingif(isset($page)){if($rows){$rs = mysqli_fetch_assoc($result);$total = $rs["Total"];}$totalPages = ceil($total / $perpage);if($page <=1 ){echo "<span id='page_links' style='font-weight: bold;'></span>";}else{$j = $page - 1;?><span><a id='page_a_link' href='<?php echo bloginfo('url') ?>/search_proposal?hal=<?php echo $j; ?>'><img src="<?php echo bloginfo('template_url') ?>/images/back.jpg"></img></a></span><?php}for($i=1; $i <= $totalPages; $i++){if($i<>$page){?><span><a id='page_a_link' href='<?php echo bloginfo('url') ?>/search_proposal?hal=<?php echo $i ?>'><?php echo $i ?></a></span><?php}else{echo "<span id='page_links' style='font-weight: bold;'></span>";}}if($page == $totalPages  or $totalPages==0) //if the page is only 1{echo "<span id='page_links' style='font-weight: bold;'></span>";}else{$j = $page + 1;?><span><a id='page_a_link' href='<?php echo bloginfo('url') ?>/search_proposal?hal=<?php echo $j ?>'><img src="<?php echo bloginfo('template_url') ?>/images/next.jpg"></img></a></span><?php}}?></div> <div align=right><form id="form_per_page" name="form_per_page" method="POST" action="<?php echo bloginfo('url') ?>/search_proposal/">Results per page :<select id="per_page" name="per_page" style="width:60px; height:25px; font-size:15px" onchange="document.forms['form_per_page'].submit();"><option value="5" <?php if($_SESSION[per_page]==5){ echo"selected"; } ?> >5</option><option value="10" <?php if($_SESSION[per_page]==10){ echo"selected"; } ?> >10</option><option value="15" <?php if($_SESSION[per_page]==15){ echo"selected"; } ?> >15</option><option value="20" <?php if($_SESSION[per_page]==20){ echo"selected"; } ?> >20</option></select></form></div>			<?php  }else{if(!isset($_SESSION[login])){?>Please <a href="<?php echo bloginfo('url') ?>/login-page/">Login</a> / <a href="<?php echo bloginfo('url') ?>/register-user/">Register</a> first<?php}else{?>This feature is only for Investor users.<?php}}?>						
			<?php																																				
				// CONTENT
				//the_content();

				echo '<div class="clear h20"><!-- --></div>';
				
				// PAGINATION
				wp_link_pages(array('before' => '<p><strong>'.__( 'Pages','pandathemes' ).':</strong> ', 'after' => '</p>', 'next_or_number' => 'number'));
				
				// COMMENTS ETC.
				if ( $theme_options['pages_metas'] == 'enable' ) : comments_template(); endif;

	endwhile;

		else : echo '<div class="contentbox w620"><h2>404</h2><p>'.__('Sorry, no posts matched your criteria.','pandathemes').'</p>';

	endif; ?>

	</div> <!-- end_of_contentbox -->

		<?php
			// SIDEBAR
			if ($sidebar == 'Buddy Sidebar') :
				include(TEMPLATEPATH.'/inc/sidebar_buddy.php');
			else :
				include(TEMPLATEPATH.'/inc/sidebar.php');
			endif;

	get_footer();

?>